﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CVSAMaster.Master" AutoEventWireup="true"
    CodeBehind="ConsultaCorretoras.aspx.cs" Inherits="CVSA.Suporte.Sinacor.BMFBovespa.ConsultaCorretoras.ConsultaCorretoras" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        body
        {
            font-family: Calibri;
            font-size: 11pt;
            border: solid 1px;
            margin : 0px;
        }
        .style1
        {
            vertical-align: top;
            width: 150px;
        }
        .tb
        {
            
            margin-left: 50px;
        }
        .style2
        {
            vertical-align: top;
            width: 500px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p align="center" style="font-size: 15pt">
        Pesquisa de Corretoras
    </p>
    <table class="tb">
        <tr>
            <td>
                <table>
                    <tr>
                        <td class="style1">
                            Informe o nome da corretora:
                        </td>
                        <td>
                            <asp:TextBox runat="server" ID="txtNomeCorretora" onkeyup="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$btnPesquisar\',\'\')', 500)"
                                Width="590px" />
                            <asp:UpdateProgress ID="updProgress" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                                <ProgressTemplate>
                                    Carregando...
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </td>
                    </tr>
                </table>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div style="display: none">
                            <asp:Button runat="server" ID="btnPesquisar" OnClick="btnPesquisar_Click" />
                        </div>
                        <table>
                            <tr>
                                <td class="style1">
                                    Selecione a corretora:
                                </td>
                                <td style="vertical-align: top;">
                                    <asp:ListBox runat="server" ID="lstCorretoras" AutoPostBack="True" SelectionMode='Single'
                                        OnSelectedIndexChanged="lstCorretoras_SelectedIndexChanged" Width="598px" />
                                </td>
                            </tr>
                        </table>
                        <asp:Panel runat="server" ID="plDetalheCorretoras" Visible="false">
                            <table>
                                <tr>
                                    
                                    <td style="vertical-align: top;">
                                    Contatos:<br />
                                        <asp:GridView runat="server" ID="gvUsuariosCorretora" AutoGenerateColumns="False"
                                            BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
                                            CellPadding="3" ForeColor="Black" GridLines="Vertical" Width="800px" EmptyDataText="Nenhuma pessoa encontrada para esta corretora.">
                                            <Columns>
                                                <asp:BoundField DataField="Nome" HeaderText="Nome" />
                                                <asp:BoundField DataField="Departamento" HeaderText="Departamento" />
                                                <asp:BoundField DataField="Telefone" HeaderText="Telefone" />
                                                <asp:BoundField DataField="E-Mail" HeaderText="E-Mail" />
                                            </Columns>
                                            <FooterStyle BackColor="#CCCCCC" />
                                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                            <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                                            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                                            <AlternatingRowStyle BackColor="#CCCCCC" />
                                        </asp:GridView>
                                    </td>
                               
                                    
                                    <td style="vertical-align: top;">
                                    Sistemas: <br />
                                        <asp:GridView runat="server" ID="gvSistemas" AutoGenerateColumns="False" ShowHeader="False"
                                            BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
                                            CellPadding="3" ForeColor="Black" GridLines="Vertical" Width="250px" EmptyDataText="Nenhum sistema encontrado para esta corretora.">
                                            <Columns>
                                                <asp:BoundField DataField="Nm_Sistema" />
                                            </Columns>
                                            <FooterStyle BackColor="#CCCCCC" />
                                            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                            <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                                            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                                            <AlternatingRowStyle BackColor="#CCCCCC" />
                                        </asp:GridView>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
    </table>
</asp:Content>
